<template>
    <view class="flex-col homepage">
        <view class="flex-col wrapper" v-for="nucleic in nucleic">
            <view class="flex-row wraper-row">
                <view class="u-line-1 text">{{nucleic.thePatient.name}}</view>
                <view class="box">
                    <view class="u-line-1 text-two">阴性</view>
                </view>
            </view>
            <view class="flex-row wraper-row-two">
                <view class="u-line-1 text-three">身份证号码</view>
                <view class="u-line-1 text-four">{{nucleic.thePatient.number}}</view>
            </view>
            <view class="flex-row wraper-row-three">
                <view class="u-line-1 text-five">检测机构</view>
                <view class="u-line-1 text-six">{{nucleic.campus.campusName}}</view>
            </view>
            <view class="flex-row wraper-row-four">
                <view class="u-line-1 text-seven">检测时间</view>
                <view class="u-line-1 text-eight">{{nucleic.visitTime}}</view>
            </view>
            <view class="u-line-1 text-nine"></view>
        </view>
    </view>
</template>
<script>
    export default {
        data() {
            return {
				URL: 'http://localhost:9000/', //主域名
				nucleic:[]
			}
        },
        methods: {
			
			nucleicResult(id){
				uni.request({
					url: this.URL + "appointment/appointment/nucleic-acid/nucleicResult/" + id,
					method:"GET",
					success: (res) => {
						console.log(res)
						if (res.data.code == 20000) {
							this.nucleic = res.data.data.nucleic
						}
						console.log(this.nucleic)
					}
				})
			}

        },
		onLoad(res) {
			console.log(res.id)
			this.nucleicResult(res.id)
		}
    }
</script>
<style lang="scss" scoped>
    /** 全局样式-开始,建议放在公共css样式文件中,比如common.css 或app.vue文件 */

    html,
    body {
        margin: 0;
        width: 100%;
        height: 100%;
        font-size: 16px
    }

    view,
    text,
    image {
        position: relative;
        box-sizing: border-box;
        flex-shrink: 0;
    }

    .flex-col {
        display: flex;
        align-items: flex-start;
        flex-direction: column;
    }

    .flex-row {
        display: flex;
        align-items: flex-start;
    }

    .flex-col .flex-row {
        width: 100%
    }

    /** 全局样式-结束*/

    .homepage {
        padding: 41rpx 22rpx 0rpx 22rpx;
        border-width: 30rpx;

        .wrapper {
            width: 100%;
            margin-bottom: 30rpx;
            padding: 30rpx 0rpx 34rpx 30rpx;
            border-radius: 20rpx;
            background: #ffffff;

            .wraper-row {
                width: 614rpx;
                justify-content: space-between;
                margin-bottom: 20rpx;

                .text {
                    width: 310rpx;
                    font-size: 32rpx;
                    font-weight: 800;
                }

                .box {
                    width: 110rpx;
                    height: 48rpx;
                    padding: 2rpx 0rpx 0rpx 17rpx;
                    border-width: 4rpx;
                    border-style: solid;
                    border-color: #87d56a;
                    background: #e4fdde;

                    .text-two {
                        width: 68rpx;
                        letter-spacing: 4rpx;
                        color: #6bc861;
                    }
                }
            }

            .wraper-row-two {
                width: 676rpx;
                justify-content: space-between;
                margin-bottom: 30rpx;

                .text-three {
                    width: 218rpx;
                    color: #888888;
                }

                .text-four {
                    width: 390rpx;
                }
            }

            .wraper-row-three {
                width: 676rpx;
                justify-content: space-between;
                margin-bottom: 30rpx;

                .text-five {
                    width: 218rpx;
                    color: #888888;
                }

                .text-six {
                    width: 390rpx;
                }
            }

            .wraper-row-four {
                width: 676rpx;
                justify-content: space-between;

                .text-seven {
                    width: 218rpx;
                    color: #888888;
                }

                .text-eight {
                    width: 390rpx;
                }
            }

            .text-nine {
                bottom: -22rpx;
                left: -22rpx;
                position: absolute;
            }
        }

        .wrapper-two {
            width: 100%;
            padding: 30rpx 0rpx 34rpx 30rpx;
            border-radius: 20rpx;
            background: #ffffff;

            .text-ten {
                width: 310rpx;
                margin-bottom: -38rpx;
                font-size: 32rpx;
                font-weight: 800;
            }

            .wraper-row-five {
                width: 110rpx;
                height: 48rpx;
                margin: 0rpx 0rpx 20rpx 504rpx;
                padding: 2rpx 0rpx 0rpx 17rpx;
                border-width: 4rpx;
                border-style: solid;
                border-color: #87d56a;
                background: #e4fdde;

                .text-eleven {
                    width: 68rpx;
                    letter-spacing: 4rpx;
                    color: #6bc861;
                }
            }

            .text-twelve {
                width: 218rpx;
                margin-bottom: -38rpx;
                color: #888888;
            }

            .text-thirteen {
                width: 390rpx;
                margin: 0rpx 0rpx 30rpx 286rpx;
            }

            .text-fourteen {
                width: 218rpx;
                margin-bottom: -38rpx;
                color: #888888;
            }

            .text-fifteen {
                width: 390rpx;
                margin: 0rpx 0rpx 30rpx 286rpx;
            }

            .text-sixteen {
                width: 218rpx;
                margin-bottom: -38rpx;
                color: #888888;
            }

            .text-seventeen {
                width: 390rpx;
                margin-left: 286rpx;
            }
        }
    }
</style>